Optimal. Leaf size=46 \[ \frac {2 \sin \left (a+\frac {b}{x}\right )}{b^3}-\frac {2 \cos \left (a+\frac {b}{x}\right )}{b^2 x}-\frac {\sin \left (a+\frac {b}{x}\right )}{b x^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3380, 3296, 2637} \[ \frac {2 \sin \left (a+\frac {b}{x}\right )}{b^3}-\frac {2 \cos \left (a+\frac {b}{x}\right )}{b^2 x}-\frac {\sin \left (a+\frac {b}{x}\right )}{b x^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2637
Rule 3296
Rule 3380
Rubi steps
\begin {align*} \int \frac {\cos \left (a+\frac {b}{x}\right )}{x^4} \, dx &=-\operatorname {Subst}\left (\int x^2 \cos (a+b x) \, dx,x,\frac {1}{x}\right )\\ &=-\frac {\sin \left (a+\frac {b}{x}\right )}{b x^2}+\frac {2 \operatorname {Subst}\left (\int x \sin (a+b x) \, dx,x,\frac {1}{x}\right )}{b}\\ &=-\frac {2 \cos \left (a+\frac {b}{x}\right )}{b^2 x}-\frac {\sin \left (a+\frac {b}{x}\right )}{b x^2}+\frac {2 \operatorname {Subst}\left (\int \cos (a+b x) \, dx,x,\frac {1}{x}\right )}{b^2}\\ &=-\frac {2 \cos \left (a+\frac {b}{x}\right )}{b^2 x}+\frac {2 \sin \left (a+\frac {b}{x}\right )}{b^3}-\frac {\sin \left (a+\frac {b}{x}\right )}{b x^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.00, size = 46, normalized size = 1.00 \[ \frac {2 \sin \left (a+\frac {b}{x}\right )}{b^3}-\frac {2 \cos \left (a+\frac {b}{x}\right )}{b^2 x}-\frac {\sin \left (a+\frac {b}{x}\right )}{b x^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.71, size = 43, normalized size = 0.93 \[ -\frac {2 \, b x \cos \left (\frac {a x + b}{x}\right ) + {\left (b^{2} - 2 \, x^{2}\right )} \sin \left (\frac {a x + b}{x}\right )}{b^{3} x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.43, size = 107, normalized size = 2.33 \[ -\frac {a^{2} \sin \left (\frac {a x + b}{x}\right ) - 2 \, a \cos \left (\frac {a x + b}{x}\right ) - \frac {2 \, {\left (a x + b\right )} a \sin \left (\frac {a x + b}{x}\right )}{x} + \frac {2 \, {\left (a x + b\right )} \cos \left (\frac {a x + b}{x}\right )}{x} + \frac {{\left (a x + b\right )}^{2} \sin \left (\frac {a x + b}{x}\right )}{x^{2}} - 2 \, \sin \left (\frac {a x + b}{x}\right )}{b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 92, normalized size = 2.00 \[ -\frac {\left (a +\frac {b}{x}\right )^{2} \sin \left (a +\frac {b}{x}\right )-2 \sin \left (a +\frac {b}{x}\right )+2 \cos \left (a +\frac {b}{x}\right ) \left (a +\frac {b}{x}\right )-2 a \left (\cos \left (a +\frac {b}{x}\right )+\left (a +\frac {b}{x}\right ) \sin \left (a +\frac {b}{x}\right )\right )+a^{2} \sin \left (a +\frac {b}{x}\right )}{b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [C] time = 1.23, size = 50, normalized size = 1.09 \[ \frac {{\left (i \, \Gamma \left (3, \frac {i \, b}{x}\right ) - i \, \Gamma \left (3, -\frac {i \, b}{x}\right )\right )} \cos \relax (a) + {\left (\Gamma \left (3, \frac {i \, b}{x}\right ) + \Gamma \left (3, -\frac {i \, b}{x}\right )\right )} \sin \relax (a)}{2 \, b^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.37, size = 47, normalized size = 1.02 \[ \frac {2\,\sin \left (a+\frac {b}{x}\right )}{b^3}-\frac {b^2\,\sin \left (a+\frac {b}{x}\right )+2\,b\,x\,\cos \left (a+\frac {b}{x}\right )}{b^3\,x^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 3.04, size = 46, normalized size = 1.00 \[ \begin {cases} - \frac {\sin {\left (a + \frac {b}{x} \right )}}{b x^{2}} - \frac {2 \cos {\left (a + \frac {b}{x} \right )}}{b^{2} x} + \frac {2 \sin {\left (a + \frac {b}{x} \right )}}{b^{3}} & \text {for}\: b \neq 0 \\- \frac {\cos {\relax (a )}}{3 x^{3}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________